The present invention is concerned with digital halftone generation techniques for the printing of digitized continuous tone images on printers which have fixed print positions and a limited range of discrete print intensities, the most common case being bi-level printers. In particular, the invention is directed to the utilization of error propagation to compensate for the absence of continuous printing of gray values, and an improved technique for edge enhancement.
In the conventional printing process, continuous tone images are prepared for printing by exposure through a halftone screen. The resultant image will have dots of various sizes, one for each opening in the screen. These dots are larger where more light penetrates the screen and smaller where less light is present. Thus the exposure through the screen converts the gray value of the original image at the opening in the screen into a dot of appropriate diameter.
In the digital analog of the above process, the original image is scanned with a scanner and the data are captured in a digital computer. These data consist of binary representations of the scanned gray values; each such value (typically ranging from 0 to 255) corresponds to one scanned area or pixel of the input image. To reproduce this image on a printer capable of only printing black dots or pels in fixed output positions, it is necessary to create a sensation of gray by suitable choice of the pels to be printed. A summary of various techniques that have been used in the past is contained in the IBM Journal of Research and Development, Vol. 26, No. 6, pps. 687-697.
The scanned image may be scaled in the computer,but in any event, it may be assumed, without loss of generality, that there is one pixel of the input image for each dot to be represented in the output. The dots are represented in the output of a digital printer as patterns of pels, and the pel patterns may be considered to be arranged in blocks. Each pel in a block is either printed or not by the digital printer. Each such block represents the digital analog of the halftone dot used in conventional printing. Such a block may be of any shape which contains an integral number of pel positions and which, when replicated, fills the area to be printed without overlap. Square or rectangular block shapes are convenient. An extreme case is that where the block contains only one pel. Different levels of gray are obtained by printing or reproducing different pel patterns within a block. If the block contains only one pel, only two values of gray are available. Additional pels within a block will permit the printing of additional discrete gray values. Larger blocks will give more discrete gray values or levels, but also tend to reduce the resolution of the output image.
An error occurs in the gray values of the output image when the gray levels available for printing within a block differ from the gray level determined for the respective block, which level is based on the brightness of the corresponding analogous halftone dot. Hence, the limited number of gray values available from the blocks limits the quality of the printed image due to the absence of correct grays in some areas and also to the creation of contours as the reproduction process goes from one block pattern to another in a region of slowly varying gray value.
These problems may be alleviated by intermixing the levels in different blocks in such a manner as to obtain the desired gray value as an average over many neighboring blocks. A technique of "error propagation" used to achieve such an intermixing is described, for example, in co-pending U.S. application U.S. Pat. No. 4,569,081, assigned to the same assignee as the present invention. In error techniques of this type the gray value desired at a given block position in an output image is determined from the input gray level at that position added to the error propagated from previous positions. More particularly, to begin with, an output pel pattern for a given block is selected from among the available patterns, which pattern typically represents an approximation to the gray value desired for that block. The error is determined as the difference between the desired gray and the gray now associated with the given block. The determined error is then distributed or assigned to one or more adjacent block positions on the same or subsequent lines of the image. This selection and error distribution method is then continued throughout the lines of the image taking into account the assigned error when selecting the appropriate pel pattern for each block.
A variety of methods have been previously used for allocating the distribution of the error. However, all divide the error into fixed proportions and thus have suffered to a greater or lesser extent from the problem of producing "worms", that is, output pattern artifacts consisting of apparent curved or straight lines.
In addition to the "worms", these methods tend to give fuzzy edges between dark and light regions of the image.
The present invention concerns itself with the elimination of the "worms" and with the sharpening of the fuzzy edges.